// 通用
const state = {
  appSpinShow: false, // 全局的loading
  navCollapsed: false, // 侧边栏的收缩合并
  ceptName: '',
  subscribeMenus: null,
  subscribeMenuId: '',
  subscribeSubMenus: null
}

const mutations = {
  // 设置全局
  setAppSpinShow (state, newState) {
    state.appSpinShow = newState;
  },

  // 设置侧边栏的收缩
  setNavCollapsed (state, newState) {
    state.navCollapsed = newState;
  },

  // 设置订阅菜单
  setSubscribeMenus (state, subscribeMenus) {
    state.subscribeMenus = subscribeMenus;
  },

  // 设置用户订阅菜单Id
  setSubscribeMenuId (state, subscribeMenuId) {
    state.subscribeMenuId = subscribeMenuId;
  },

  // 设置用户订阅子菜单
  setSubscribeSubMenus (state, subscribeSubMenus) {
    state.subscribeSubMenus = subscribeSubMenus;
  },

  // 设置图谱的名字
  setCeptName (state, newState) {
    state.ceptName = newState;
  }
}

export default {
  state,
  mutations
}
